package com.ouyang.bo.api.controller;

import com.ouyang.bo.api.util.JSONResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 开发测试类
 *
 * @param
 * @author duanpj
 * @date 2020/8/4
 */
@RestController
@RequestMapping("/api/duanpj")
public class ApiDuanpjController {

    private static final Logger logger = LoggerFactory.getLogger(ApiDuanpjController.class);

    /**
     * 获取用户编号接口
     * 验证token信息
     *
     * @author duanpj
     * @param
     * @date 2020/8/5 0005
     */
    @GetMapping("/getUserCode")
    public JSONResult getUserCode(HttpServletRequest request) {
        String ad = request.getAttribute("userCode").toString();
        //String ad = "";
        return JSONResult.ok(ad);
    }

}
